<template>
  <view class="header-search">
    <view class="search-container">
      <view class="search-logo">
        <image class="search-logo--image" src="/static/images/logo.png" mode="widthFix" />
      </view>
      <view class="search-input" @click="handleClickGotoSearch">
        <uiIcon class="icon-search" type="ui-icon" name="ui-icon-search"></uiIcon>
        <input class="search-header__input" placeholder="搜索课程、关键词" disabled ref="input" />
      </view>
    </view>
  </view>
</template>

<script>
import uiIcon from "@/components/base/icon/index.vue";
export default {
  name: "headerSearchComponent",
  components: {
    uiIcon
  },
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    handleClickGotoSearch() {
      uni.navigateTo({
        url: "/pages/classify/search/index"
      });
    }
  }
};
</script>

<style scoped lang="scss" >
.header-search {
  display: inline-block;
  height: 100upx;
  width: 750upx;
  background-color: #fff;

  .search-container {
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    padding: 20upx 30upx;
  }
  .search-logo {
    flex: 0 0 61upx;
    width: 61upx;
    padding: 7upx 0;
    .search-logo--image {
      width: 46upx;
      height: 46upx;
    }
  }
  .search-input {
    position: relative;
    flex: 1;
    .search-header__input {
      box-sizing: border-box;
      padding: 0 20upx;
      padding-left: 70upx;
      display: block;
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      margin: 0;
      color: #323233;
      text-align: left;
      background-color: #f4f4f4;
      border: 0;
      border-radius: 30upx;
      resize: none;
      height: 60upx;
      font-size: 24upx;
    }

    .icon-search {
      position: absolute;
      top: 15upx;
      left: 20upx;
    }
  }
}
</style>
